package com.ghck.server.model.query;

import java.io.Serializable;

import com.google.gson.Gson;

public class Paging implements Serializable {

	private static final long serialVersionUID = 1L;
	private Integer startId;
	private Integer endId;
	private Integer start = 0;		// 分页
	private Integer limit = 10;      //
	private Integer count = 0;  
	
	private String sortStatment; 
	
	public Integer getStart() {
		return start;
	}
	public void setStart(Integer start) {
		this.start = start;
	}
	public Integer getLimit() {
		return limit;
	}
	
	public String getSortStatment() {
		return sortStatment;
	}
	public void setSortStatment(String sortStatment) {
		this.sortStatment = sortStatment;
	}
	
	public Integer getCount() {
		return count;
	}
	public void setCount(Integer count) {
		this.count = count;
	}
	
	public Integer getStartId() {
		return startId;
	}
	public void setStartId(Integer startId) {
		this.startId = startId;
	}
	public Integer getEndId() {
		return endId;
	}
	public void setEndId(Integer endId) {
		this.endId = endId;
	}
	public void setLimit(Integer limit) {
		if(limit!=null && limit==0){
			limit = null;
			start = null;
		}
		this.limit = limit;
	}
	
	@Override
	public String toString() {
		Gson gson = new Gson();
		return gson.toJson(this);
	}
	
	public void dealWith(){
		
	};
}